<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-tool/garble/garble.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('garble_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">garble.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="garble_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef LIBGARBLE_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define LIBGARBLE_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="garble_2block_8h.html">block.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;openssl/sha.h&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="garble_8h.html#a4860dfda91f16ccd0cbf45481aba46fc">   11</a></span>&#160;<span class="preprocessor">#define GARBLE_OK 0</span></div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="garble_8h.html#a31a53c5ee0f66ce6b74ac1a171d35625">   12</a></span>&#160;<span class="preprocessor">#define GARBLE_ERR -1</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">/* Supported garbling types */</span></div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">   15</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="comment">/* GRR3 and free-XOR as used in JustGarble */</span></div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087">   17</a></span>&#160;    <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087">GARBLE_TYPE_STANDARD</a>,</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="comment">/* Half-gates approach of Zahur, Rosulek, and Evans (Eurocrypt 2015) */</span></div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355">   19</a></span>&#160;    <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355">GARBLE_TYPE_HALFGATES</a>,</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <span class="comment">/* Privacy-free approach of Zahur, Rosulek, and Evans (Eurocrypt 2015) */</span></div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233">   21</a></span>&#160;    <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233">GARBLE_TYPE_PRIVACY_FREE</a>,</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;} <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a>;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">/* Supported gate types */</span></div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">   25</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a52460d58d67a95fd6a4c3de2636d4336">   26</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a52460d58d67a95fd6a4c3de2636d4336">GARBLE_GATE_ZERO</a> = 0,</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a8fad1597166462317aea89d5ffd7bf26">   27</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a8fad1597166462317aea89d5ffd7bf26">GARBLE_GATE_ONE</a> = 15,</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">   28</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">GARBLE_GATE_AND</a> = 8,</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aba755ac9df8a00aced8acf0c4954adff">   29</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aba755ac9df8a00aced8acf0c4954adff">GARBLE_GATE_OR</a> = 14,</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">   30</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">GARBLE_GATE_XOR</a> = 6,</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9">   31</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9">GARBLE_GATE_NOT</a> = 5,</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a3a316e5e965d01bedddeb55c7f0735f6">   32</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a3a316e5e965d01bedddeb55c7f0735f6">GARBLE_GATE_EMPTY</a> = -1,</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;} <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structgarble__gate.html">   35</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="comment">/* The type of gate this is */</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structgarble__gate.html#a3869892de6a197d4faaa383c5ed71a32">   37</a></span>&#160;    <a class="code" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a> <a class="code" href="structgarble__gate.html#a3869892de6a197d4faaa383c5ed71a32">type</a>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="comment">/* The input/output wires associated with this gate */</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structgarble__gate.html#a9b4e8d4236eee04c29dea84ef77728a1">   39</a></span>&#160;    uint64_t input0, input1, <a class="code" href="structgarble__gate.html#a9b4e8d4236eee04c29dea84ef77728a1">output</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;} <a class="code" href="structgarble__gate.html">garble_gate</a>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105">   42</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105a05fb9d7d8c32920f6e9d71bc88ca926f">   43</a></span>&#160;    <a class="code" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105a05fb9d7d8c32920f6e9d71bc88ca926f">GARBLE_FIXED_WIRE_ZERO</a> = 0,</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105ad86498266f1fa48c33b463de42008b26">   44</a></span>&#160;    <a class="code" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105ad86498266f1fa48c33b463de42008b26">GARBLE_FIXED_WIRE_ONE</a> = 1</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;} <a class="code" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105">garble_fixed_wire_e</a>;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structgarble__fixed__wire.html">   47</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structgarble__fixed__wire.html#a61f61fae6823013387ee3f7d08780af0">   48</a></span>&#160;    <a class="code" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105">garble_fixed_wire_e</a> <a class="code" href="structgarble__fixed__wire.html#a61f61fae6823013387ee3f7d08780af0">type</a>;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structgarble__fixed__wire.html#a7885682b461b072621fde9ab08d7f743">   49</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structgarble__fixed__wire.html#a7885682b461b072621fde9ab08d7f743">idx</a>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;} <a class="code" href="structgarble__fixed__wire.html">garble_fixed_wire</a>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structgarble__circuit.html">   52</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="comment">/* n: number of inputs */</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="comment">/* m: number of outputs */</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="comment">/* q: number of gates */</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="comment">/* r: number of wires */</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a79f4f92f1df8e9929c6156cc11de6fec">   57</a></span>&#160;    uint64_t n, m, q, <a class="code" href="structgarble__circuit.html#a79f4f92f1df8e9929c6156cc11de6fec">r</a>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="comment">/* garbling scheme type */</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#aaa4c4983bb1401816c1a39c9336fcfb4">   59</a></span>&#160;    <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a> <a class="code" href="structgarble__circuit.html#aaa4c4983bb1401816c1a39c9336fcfb4">type</a>;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a3639a33ddf9d8c0d61588465273518c8">   61</a></span>&#160;    <a class="code" href="structgarble__gate.html">garble_gate</a> *<a class="code" href="structgarble__circuit.html#a3639a33ddf9d8c0d61588465273518c8">gates</a>;         <span class="comment">/* q */</span></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a9f324052d000ed1fa3339f41cd213584">   62</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *<a class="code" href="structgarble__circuit.html#a9f324052d000ed1fa3339f41cd213584">table</a>;               <span class="comment">/* q */</span></div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a25ba4e0f2700a83b61c38459af54097b">   63</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *<a class="code" href="structgarble__circuit.html#a25ba4e0f2700a83b61c38459af54097b">wires</a>;               <span class="comment">/* 2 * r */</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a19b35bdc728c211f3e5d59589c811b75">   64</a></span>&#160;    <span class="keywordtype">int</span> *<a class="code" href="structgarble__circuit.html#a19b35bdc728c211f3e5d59589c811b75">outputs</a>;               <span class="comment">/* m */</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="comment">/* permutation bits of output wire labels */</span></div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a2145259a84745aea5fd0cd7bf4219953">   67</a></span>&#160;    <span class="keywordtype">bool</span> *<a class="code" href="structgarble__circuit.html#a2145259a84745aea5fd0cd7bf4219953">output_perms</a>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="comment">/* fixed label used for constant values */</span></div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#a59b7e8c91fdf4bb909ef53036b85969d">   69</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="structgarble__circuit.html#a59b7e8c91fdf4bb909ef53036b85969d">fixed_label</a>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="comment">/* key used for fixed-key AES */</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structgarble__circuit.html#abac68013d6e9a984df840422e253b153">   71</a></span>&#160;    <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> <a class="code" href="structgarble__circuit.html#abac68013d6e9a984df840422e253b153">global_key</a>;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;} <a class="code" href="structgarble__circuit.html">garble_circuit</a>;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment">/* Return the table size of a garbled circuit */</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">inline</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="garble_8h.html#a20bfa75f4c119870870505e56a94570d">   76</a></span>&#160;<span class="keywordtype">size_t</span> <a class="code" href="garble_8h.html#a20bfa75f4c119870870505e56a94570d">garble_table_size</a>(<span class="keyword">const</span> <a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc)</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;{</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keywordflow">switch</span>(gc-&gt;<a class="code" href="structgarble__circuit.html#aaa4c4983bb1401816c1a39c9336fcfb4">type</a>) {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087">GARBLE_TYPE_STANDARD</a>:</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">return</span> 3 * <span class="keyword">sizeof</span>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355">GARBLE_TYPE_HALFGATES</a>:</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordflow">return</span> 2 * <span class="keyword">sizeof</span>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233">GARBLE_TYPE_PRIVACY_FREE</a>:</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">sizeof</span>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="comment">/* Create a new circuit */</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<a class="code" href="garble_8h.html#a89d737f9363be1158045f0ed69c559e6">garble_new</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, uint64_t n, uint64_t m, <a class="code" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a> type);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="comment">/* Delete a garbled circuit */</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<a class="code" href="garble_8h.html#a6c1b1fd633c98c372c0e1b20c591734e">garble_delete</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="comment">/* Garbles a circuit.</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="comment">   If &#39;input_labels&#39; is NULL, generate input-wire labels.</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="comment">   If &#39;output_labels&#39; is NULL, don&#39;t store output-wire labels.</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<a class="code" href="garble_8h.html#a7ec524e6b001e5aac0add6e919ed79f3">garble_garble</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *input_labels,</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;              <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *output_labels);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="comment">/* Hash a given garbled circuit */</span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<a class="code" href="garble_8h.html#a8ec77b23347e8f4a4711314af040e6a4">garble_hash</a>(<span class="keyword">const</span> <a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> hash[SHA_DIGEST_LENGTH]);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="comment">/* Check that &#39;gc&#39; matches the hash specified in &#39;hash&#39; */</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<a class="code" href="garble_8h.html#af34b0a90e6270876e81746bcea49b1c3">garble_check</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> hash[SHA_DIGEST_LENGTH]);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="comment">/* Create a random delta block */</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<a class="code" href="garble_8h.html#a897f0ca0e18a20f471a0f5e7a8337a9f">garble_create_delta</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">/* Create &#39;n&#39; input labels and store them in &#39;labels&#39;.</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="comment">   &#39;delta&#39; specified the delta block to use; if NULL, generate a new delta.</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="comment">   &#39;privacyfree&#39; specifies whether you are using the privacy free garbling scheme.</span></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<a class="code" href="garble_8h.html#a64fd0f10ec2840d1330c2e47224919a8">garble_create_input_labels</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *labels, uint64_t n, <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *delta,</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                           <span class="keywordtype">bool</span> privacyfree);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">/* Evaluate garbled circuit &#39;gc&#39;.</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment">   &#39;input_labels&#39; specifies the input wire labels to use.</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="comment">   &#39;output_labels&#39;, if not NULL, stores the output wire labels.</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="comment">   &#39;outputs&#39;, if not NULL, stores the actual output of the computation.</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<a class="code" href="garble_8h.html#a7aa790863d24f73f7502ef7a7dc05be1">garble_eval</a>(<span class="keyword">const</span> <a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *input_labels,</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *output_labels, <span class="keywordtype">bool</span> *outputs);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<a class="code" href="garble_8h.html#aa461a818a34411380a3e1028bd4203e5">garble_extract_labels</a>(<a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *extracted_labels, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *labels,</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                      <span class="keyword">const</span> <span class="keywordtype">bool</span> *bits, uint64_t n);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="comment">/* XXX: not to be used in practice, as knowing both output blocks is completely</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment"> * insecure! */</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<a class="code" href="garble_8h.html#a4b9f7f736a766cb8ad0e880feeef6d20">garble_map_outputs</a>(<span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *output_labels, <span class="keyword">const</span> <a class="code" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *map, <span class="keywordtype">bool</span> *vals,</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                   uint64_t m);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="comment">/* write/read circuit description to/from file */</span></div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<a class="code" href="garble_8h.html#ae26c7329a5f399ac41789738554d120e">garble_circuit_to_file</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keywordtype">char</span> *fname);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<a class="code" href="garble_8h.html#a49e02f7f9707443a340667d6b31f3551">garble_circuit_from_file</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keywordtype">char</span> *fname);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keywordtype">size_t</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<a class="code" href="garble_8h.html#a27c3063abd801e159764f1fac8e33a77">garble_size</a>(<span class="keyword">const</span> <a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keywordtype">bool</span> wires);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<a class="code" href="garble_8h.html#a922d374cc71891c04534bca09b6e87cf">garble_save</a>(<span class="keyword">const</span> <a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, FILE *f, <span class="keywordtype">bool</span> wires);</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<a class="code" href="garble_8h.html#a93d0d290d611e7113a452663f46e80dc">garble_load</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, FILE *f, <span class="keywordtype">bool</span> wires);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<a class="code" href="garble_8h.html#a1e352fd4b3bba37650eba0c84b38df15">garble_to_buffer</a>(<span class="keyword">const</span> <a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keywordtype">char</span> *buf, <span class="keywordtype">bool</span> wires);</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<a class="code" href="garble_8h.html#a4f1bd70b4528fef9e8ed516521bed8be">garble_from_buffer</a>(<a class="code" href="structgarble__circuit.html">garble_circuit</a> *gc, <span class="keyword">const</span> <span class="keywordtype">char</span> *buf, <span class="keywordtype">bool</span> wires);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="structgarble__circuit_html"><div class="ttname"><a href="structgarble__circuit.html">garble_circuit</a></div><div class="ttdef"><b>Definition:</b> garble.h:52</div></div>
<div class="ttc" id="garble_8h_html_af39b2d4a5065ed9a3eed74fc34ac2ad4"><div class="ttname"><a href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a></div><div class="ttdeci">garble_type_e</div><div class="ttdef"><b>Definition:</b> garble.h:15</div></div>
<div class="ttc" id="structgarble__circuit_html_abac68013d6e9a984df840422e253b153"><div class="ttname"><a href="structgarble__circuit.html#abac68013d6e9a984df840422e253b153">garble_circuit::global_key</a></div><div class="ttdeci">block global_key</div><div class="ttdef"><b>Definition:</b> garble.h:71</div></div>
<div class="ttc" id="garble_8h_html_a897f0ca0e18a20f471a0f5e7a8337a9f"><div class="ttname"><a href="garble_8h.html#a897f0ca0e18a20f471a0f5e7a8337a9f">garble_create_delta</a></div><div class="ttdeci">block garble_create_delta(void)</div></div>
<div class="ttc" id="structgarble__circuit_html_a25ba4e0f2700a83b61c38459af54097b"><div class="ttname"><a href="structgarble__circuit.html#a25ba4e0f2700a83b61c38459af54097b">garble_circuit::wires</a></div><div class="ttdeci">block * wires</div><div class="ttdef"><b>Definition:</b> garble.h:63</div></div>
<div class="ttc" id="garble_8h_html_a7ec524e6b001e5aac0add6e919ed79f3"><div class="ttname"><a href="garble_8h.html#a7ec524e6b001e5aac0add6e919ed79f3">garble_garble</a></div><div class="ttdeci">int garble_garble(garble_circuit *gc, const block *input_labels, block *output_labels)</div></div>
<div class="ttc" id="garble_8h_html_af34b0a90e6270876e81746bcea49b1c3"><div class="ttname"><a href="garble_8h.html#af34b0a90e6270876e81746bcea49b1c3">garble_check</a></div><div class="ttdeci">int garble_check(garble_circuit *gc, const unsigned char hash[SHA_DIGEST_LENGTH])</div></div>
<div class="ttc" id="structgarble__fixed__wire_html"><div class="ttname"><a href="structgarble__fixed__wire.html">garble_fixed_wire</a></div><div class="ttdef"><b>Definition:</b> garble.h:47</div></div>
<div class="ttc" id="garble_2block_8h_html_a65abbf31b0a30290189cdb5059b5f785"><div class="ttname"><a href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a></div><div class="ttdeci">__m128i block</div><div class="ttdef"><b>Definition:</b> block.h:8</div></div>
<div class="ttc" id="garble_8h_html_a49e02f7f9707443a340667d6b31f3551"><div class="ttname"><a href="garble_8h.html#a49e02f7f9707443a340667d6b31f3551">garble_circuit_from_file</a></div><div class="ttdeci">int garble_circuit_from_file(garble_circuit *gc, char *fname)</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">GARBLE_GATE_XOR</a></div><div class="ttdef"><b>Definition:</b> garble.h:30</div></div>
<div class="ttc" id="garble_8h_html_a7697bea1e9186be63eee52a56b77e105"><div class="ttname"><a href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105">garble_fixed_wire_e</a></div><div class="ttdeci">garble_fixed_wire_e</div><div class="ttdef"><b>Definition:</b> garble.h:42</div></div>
<div class="ttc" id="structgarble__fixed__wire_html_a7885682b461b072621fde9ab08d7f743"><div class="ttname"><a href="structgarble__fixed__wire.html#a7885682b461b072621fde9ab08d7f743">garble_fixed_wire::idx</a></div><div class="ttdeci">int idx</div><div class="ttdef"><b>Definition:</b> garble.h:49</div></div>
<div class="ttc" id="garble_8h_html_af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087"><div class="ttname"><a href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087">GARBLE_TYPE_STANDARD</a></div><div class="ttdef"><b>Definition:</b> garble.h:17</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641a3a316e5e965d01bedddeb55c7f0735f6"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a3a316e5e965d01bedddeb55c7f0735f6">GARBLE_GATE_EMPTY</a></div><div class="ttdef"><b>Definition:</b> garble.h:32</div></div>
<div class="ttc" id="garble_8h_html_a922d374cc71891c04534bca09b6e87cf"><div class="ttname"><a href="garble_8h.html#a922d374cc71891c04534bca09b6e87cf">garble_save</a></div><div class="ttdeci">int garble_save(const garble_circuit *gc, FILE *f, bool wires)</div></div>
<div class="ttc" id="structgarble__circuit_html_a59b7e8c91fdf4bb909ef53036b85969d"><div class="ttname"><a href="structgarble__circuit.html#a59b7e8c91fdf4bb909ef53036b85969d">garble_circuit::fixed_label</a></div><div class="ttdeci">block fixed_label</div><div class="ttdef"><b>Definition:</b> garble.h:69</div></div>
<div class="ttc" id="garble_8h_html_a64fd0f10ec2840d1330c2e47224919a8"><div class="ttname"><a href="garble_8h.html#a64fd0f10ec2840d1330c2e47224919a8">garble_create_input_labels</a></div><div class="ttdeci">void garble_create_input_labels(block *labels, uint64_t n, block *delta, bool privacyfree)</div></div>
<div class="ttc" id="structgarble__gate_html_a9b4e8d4236eee04c29dea84ef77728a1"><div class="ttname"><a href="structgarble__gate.html#a9b4e8d4236eee04c29dea84ef77728a1">garble_gate::output</a></div><div class="ttdeci">uint64_t output</div><div class="ttdef"><b>Definition:</b> garble.h:39</div></div>
<div class="ttc" id="structgarble__fixed__wire_html_a61f61fae6823013387ee3f7d08780af0"><div class="ttname"><a href="structgarble__fixed__wire.html#a61f61fae6823013387ee3f7d08780af0">garble_fixed_wire::type</a></div><div class="ttdeci">garble_fixed_wire_e type</div><div class="ttdef"><b>Definition:</b> garble.h:48</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">GARBLE_GATE_AND</a></div><div class="ttdef"><b>Definition:</b> garble.h:28</div></div>
<div class="ttc" id="garble_8h_html_a89d737f9363be1158045f0ed69c559e6"><div class="ttname"><a href="garble_8h.html#a89d737f9363be1158045f0ed69c559e6">garble_new</a></div><div class="ttdeci">int garble_new(garble_circuit *gc, uint64_t n, uint64_t m, garble_type_e type)</div></div>
<div class="ttc" id="structgarble__gate_html_a3869892de6a197d4faaa383c5ed71a32"><div class="ttname"><a href="structgarble__gate.html#a3869892de6a197d4faaa383c5ed71a32">garble_gate::type</a></div><div class="ttdeci">garble_gate_type_e type</div><div class="ttdef"><b>Definition:</b> garble.h:37</div></div>
<div class="ttc" id="garble_8h_html_a27c3063abd801e159764f1fac8e33a77"><div class="ttname"><a href="garble_8h.html#a27c3063abd801e159764f1fac8e33a77">garble_size</a></div><div class="ttdeci">size_t garble_size(const garble_circuit *gc, bool wires)</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a></div><div class="ttdeci">garble_gate_type_e</div><div class="ttdef"><b>Definition:</b> garble.h:25</div></div>
<div class="ttc" id="structgarble__circuit_html_aaa4c4983bb1401816c1a39c9336fcfb4"><div class="ttname"><a href="structgarble__circuit.html#aaa4c4983bb1401816c1a39c9336fcfb4">garble_circuit::type</a></div><div class="ttdeci">garble_type_e type</div><div class="ttdef"><b>Definition:</b> garble.h:59</div></div>
<div class="ttc" id="garble_8h_html_ae26c7329a5f399ac41789738554d120e"><div class="ttname"><a href="garble_8h.html#ae26c7329a5f399ac41789738554d120e">garble_circuit_to_file</a></div><div class="ttdeci">int garble_circuit_to_file(garble_circuit *gc, char *fname)</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641a8fad1597166462317aea89d5ffd7bf26"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a8fad1597166462317aea89d5ffd7bf26">GARBLE_GATE_ONE</a></div><div class="ttdef"><b>Definition:</b> garble.h:27</div></div>
<div class="ttc" id="garble_8h_html_a20bfa75f4c119870870505e56a94570d"><div class="ttname"><a href="garble_8h.html#a20bfa75f4c119870870505e56a94570d">garble_table_size</a></div><div class="ttdeci">size_t garble_table_size(const garble_circuit *gc)</div><div class="ttdef"><b>Definition:</b> garble.h:76</div></div>
<div class="ttc" id="garble_8h_html_a7697bea1e9186be63eee52a56b77e105ad86498266f1fa48c33b463de42008b26"><div class="ttname"><a href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105ad86498266f1fa48c33b463de42008b26">GARBLE_FIXED_WIRE_ONE</a></div><div class="ttdef"><b>Definition:</b> garble.h:44</div></div>
<div class="ttc" id="garble_8h_html_a7aa790863d24f73f7502ef7a7dc05be1"><div class="ttname"><a href="garble_8h.html#a7aa790863d24f73f7502ef7a7dc05be1">garble_eval</a></div><div class="ttdeci">int garble_eval(const garble_circuit *gc, const block *input_labels, block *output_labels, bool *outputs)</div></div>
<div class="ttc" id="garble_8h_html_af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355"><div class="ttname"><a href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355">GARBLE_TYPE_HALFGATES</a></div><div class="ttdef"><b>Definition:</b> garble.h:19</div></div>
<div class="ttc" id="garble_8h_html_aa461a818a34411380a3e1028bd4203e5"><div class="ttname"><a href="garble_8h.html#aa461a818a34411380a3e1028bd4203e5">garble_extract_labels</a></div><div class="ttdeci">void garble_extract_labels(block *extracted_labels, const block *labels, const bool *bits, uint64_t n)</div></div>
<div class="ttc" id="garble_8h_html_af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233"><div class="ttname"><a href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233">GARBLE_TYPE_PRIVACY_FREE</a></div><div class="ttdef"><b>Definition:</b> garble.h:21</div></div>
<div class="ttc" id="garble_8h_html_a93d0d290d611e7113a452663f46e80dc"><div class="ttname"><a href="garble_8h.html#a93d0d290d611e7113a452663f46e80dc">garble_load</a></div><div class="ttdeci">int garble_load(garble_circuit *gc, FILE *f, bool wires)</div></div>
<div class="ttc" id="garble_8h_html_a4f1bd70b4528fef9e8ed516521bed8be"><div class="ttname"><a href="garble_8h.html#a4f1bd70b4528fef9e8ed516521bed8be">garble_from_buffer</a></div><div class="ttdeci">int garble_from_buffer(garble_circuit *gc, const char *buf, bool wires)</div></div>
<div class="ttc" id="garble_8h_html_a1e352fd4b3bba37650eba0c84b38df15"><div class="ttname"><a href="garble_8h.html#a1e352fd4b3bba37650eba0c84b38df15">garble_to_buffer</a></div><div class="ttdeci">int garble_to_buffer(const garble_circuit *gc, char *buf, bool wires)</div></div>
<div class="ttc" id="structgarble__circuit_html_a79f4f92f1df8e9929c6156cc11de6fec"><div class="ttname"><a href="structgarble__circuit.html#a79f4f92f1df8e9929c6156cc11de6fec">garble_circuit::r</a></div><div class="ttdeci">uint64_t r</div><div class="ttdef"><b>Definition:</b> garble.h:57</div></div>
<div class="ttc" id="structgarble__circuit_html_a19b35bdc728c211f3e5d59589c811b75"><div class="ttname"><a href="structgarble__circuit.html#a19b35bdc728c211f3e5d59589c811b75">garble_circuit::outputs</a></div><div class="ttdeci">int * outputs</div><div class="ttdef"><b>Definition:</b> garble.h:64</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aba755ac9df8a00aced8acf0c4954adff"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aba755ac9df8a00aced8acf0c4954adff">GARBLE_GATE_OR</a></div><div class="ttdef"><b>Definition:</b> garble.h:29</div></div>
<div class="ttc" id="structgarble__circuit_html_a2145259a84745aea5fd0cd7bf4219953"><div class="ttname"><a href="structgarble__circuit.html#a2145259a84745aea5fd0cd7bf4219953">garble_circuit::output_perms</a></div><div class="ttdeci">bool * output_perms</div><div class="ttdef"><b>Definition:</b> garble.h:67</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641a52460d58d67a95fd6a4c3de2636d4336"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a52460d58d67a95fd6a4c3de2636d4336">GARBLE_GATE_ZERO</a></div><div class="ttdef"><b>Definition:</b> garble.h:26</div></div>
<div class="ttc" id="garble_2block_8h_html"><div class="ttname"><a href="garble_2block_8h.html">block.h</a></div></div>
<div class="ttc" id="structgarble__gate_html"><div class="ttname"><a href="structgarble__gate.html">garble_gate</a></div><div class="ttdef"><b>Definition:</b> garble.h:35</div></div>
<div class="ttc" id="garble_8h_html_a4b9f7f736a766cb8ad0e880feeef6d20"><div class="ttname"><a href="garble_8h.html#a4b9f7f736a766cb8ad0e880feeef6d20">garble_map_outputs</a></div><div class="ttdeci">int garble_map_outputs(const block *output_labels, const block *map, bool *vals, uint64_t m)</div></div>
<div class="ttc" id="garble_8h_html_a7697bea1e9186be63eee52a56b77e105a05fb9d7d8c32920f6e9d71bc88ca926f"><div class="ttname"><a href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105a05fb9d7d8c32920f6e9d71bc88ca926f">GARBLE_FIXED_WIRE_ZERO</a></div><div class="ttdef"><b>Definition:</b> garble.h:43</div></div>
<div class="ttc" id="structgarble__circuit_html_a9f324052d000ed1fa3339f41cd213584"><div class="ttname"><a href="structgarble__circuit.html#a9f324052d000ed1fa3339f41cd213584">garble_circuit::table</a></div><div class="ttdeci">block * table</div><div class="ttdef"><b>Definition:</b> garble.h:62</div></div>
<div class="ttc" id="garble_8h_html_a8ec77b23347e8f4a4711314af040e6a4"><div class="ttname"><a href="garble_8h.html#a8ec77b23347e8f4a4711314af040e6a4">garble_hash</a></div><div class="ttdeci">void garble_hash(const garble_circuit *gc, unsigned char hash[SHA_DIGEST_LENGTH])</div></div>
<div class="ttc" id="garble_8h_html_a6c1b1fd633c98c372c0e1b20c591734e"><div class="ttname"><a href="garble_8h.html#a6c1b1fd633c98c372c0e1b20c591734e">garble_delete</a></div><div class="ttdeci">void garble_delete(garble_circuit *gc)</div></div>
<div class="ttc" id="garble_8h_html_acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9"><div class="ttname"><a href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9">GARBLE_GATE_NOT</a></div><div class="ttdef"><b>Definition:</b> garble.h:31</div></div>
<div class="ttc" id="structgarble__circuit_html_a3639a33ddf9d8c0d61588465273518c8"><div class="ttname"><a href="structgarble__circuit.html#a3639a33ddf9d8c0d61588465273518c8">garble_circuit::gates</a></div><div class="ttdeci">garble_gate * gates</div><div class="ttdef"><b>Definition:</b> garble.h:61</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_eec959d81771dc8b1a750b834e1341eb.html">emp-tool</a></li><li class="navelem"><a class="el" href="dir_c655749829cb727292045fefce142869.html">garble</a></li><li class="navelem"><a class="el" href="garble_8h.html">garble.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
